@echo off
echo ========================================
echo 测试搜索功能修复
echo ========================================

echo.
echo 1. 检查后端服务状态...
netstat -an | findstr :8080
if %errorlevel% neq 0 (
    echo 后端服务未运行，请先启动后端服务
    pause
    exit /b 1
)

echo.
echo 2. 测试基本查询...
echo 测试基本列表查询...
curl -X GET "http://localhost:8080/system/arrangement/joinList?pageNum=1&pageSize=5"

echo.
echo 3. 测试护理员搜索...
echo 测试护理员搜索: user07...
curl -X GET "http://localhost:8080/system/arrangement/joinList?pageNum=1&pageSize=5&caregiver_name=user07"

echo.
echo 4. 测试护理项目搜索...
echo 测试护理项目搜索: 助餐...
curl -X GET "http://localhost:8080/system/arrangement/joinList?pageNum=1&pageSize=5&nursing_item_name=助餐"

echo.
echo 5. 测试组合搜索...
echo 测试组合搜索: 护理员=user07 AND 护理项目=助餐...
curl -X GET "http://localhost:8080/system/arrangement/joinList?pageNum=1&pageSize=5&caregiver_name=user07&nursing_item_name=助餐"

echo.
echo 6. 测试状态筛选...
echo 测试状态筛选: 待执行...
curl -X GET "http://localhost:8080/system/arrangement/joinList?pageNum=1&pageSize=5&status=待执行"

echo.
echo 测试完成！
echo 请检查前端页面，搜索功能应该现在正常工作了
pause